package com.example.dblibrary.database.entities;



import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.ForeignKey;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;

import com.example.dblibrary.database.AppDatabase;

import static android.arch.persistence.room.ForeignKey.CASCADE;


@Entity(tableName = AppDatabase.table_song_language, foreignKeys = @ForeignKey(entity = Song.class, parentColumns = "SONGS_LANGUAGE", childColumns = "LANGUAGE_ID", onDelete = CASCADE),
        indices = @Index(value = {"LANGUAGE_ID"}, unique = true))
public class SongLaguage {

    @PrimaryKey
    @ColumnInfo(name = "LANGUAGE_ID")
    public int language_id;
    @ColumnInfo(name = "LANGUAGE_NAME")
    public String language_name;


    public int getLanguage_id() {
        return language_id;
    }

    public void setLanguage_id(int language_id) {
        this.language_id = language_id;
    }

    public String getLanguage_name() {
        return language_name;
    }

    public void setLanguage_name(String language_name) {
        this.language_name = language_name;
    }
}
